home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2007 June
/
PCWorld_2007-06_cd.bin
/
zabezpeceni
/
spyeraser
/
spyeraser.exe
/
{app}
/
SpyEraser.dll
/
2110
/
MANAGE.JS
< prev
next >
Wrap
Text File
|
2007-04-23
|
3KB
|
108 lines
/////manage Page
//===================
var prev_row=null;
var objName=null;
function manage_clear()
{
var theTable = document.all['manage_table'];
var lastRow = theTable.rows.length;
for(i=0; i<lastRow ; i++)
{
theTable.deleteRow(0);
}
}
function onRowClick(){
var elem=event.srcElement;
var id;
do{
id=elem.id;
elem=elem.parentElement;
}while(! (document.all[id] && id.search('manage')>=0));
var row=document.all[id];
highlightRow(row);
}
function highlightRow(row)
{
if(prev_row != row){
if(prev_row!=null){
prev_row.style.backgroundColor="white";
}
//row.style.backgroundColor="#DFE6F9";
row.style.backgroundColor="#BAC6E1";
prev_row=row;
}
}
function manage_add(obj,key)
{
if(obj=="")
{
obj="No items to manage";
var theTable = document.all['manage_table'];
var lastRow = theTable.rows.length;
var row =theTable.insertRow();
row.setAttribute('id','manage'+lastRow);
row.onclick=onRowClick;
var cell = row.insertCell();
cell.setAttribute('align',"left");
cell.setAttribute('height',30);
cell.innerHTML=obj;
document.all['manage_remove'].disabled=true;
}else
{
var theTable = document.all['manage_table'];
var lastRow = theTable.rows.length;
var row =theTable.insertRow();
row.setAttribute('id','manage'+lastRow);
row.onclick=onRowClick;
row.key=key;
var cell = row.insertCell();
cell.setAttribute('width',20);
cell.setAttribute('align',"left");
// alert("check"+lastRow);
cell.innerHTML="<input type='checkbox' id='check"+lastRow+"' >" ;
cell = row.insertCell();
cell.setAttribute('align',"left");
cell.innerHTML=obj;
document.all['manage_remove'].disabled=false;
}
highlightRow(row);
}
function getObjectKey(index){
var str='manage'+index;
var row=document.all[str];
if(row!=null){
return row.key;
}
else
{
return "";
}
}
function setObjectName(name){
document.all['manage_display'].innerText="allowed "+name+"s";
document.all['manage_title'].innerText=name;
var str1=null;
str1="<select name=\"manage_combo\" onChange=\"onSelectChange();\"><OPTION VALUE=\"1\">Allowed "+name+"s";
str1+="<OPTION VALUE=\"2\">Blocked "+name+"s";
str1+="</select>";
document.all['manage_combo'].outerHTML=str1;
objName=name;
};
function onSelectChange()
{
document.all['manage_select_change'].click();
var nIndex=parseInt(document.all['manage_combo'].selectedIndex);
if(nIndex==0)
{
document.all['manage_display'].innerText="allowed "+objName+"s";
}else
{
document.all['manage_display'].innerText="blocked "+objName+"s";
}
}
function doitOnload()
{
document.all['manage_page'].click();
}